<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{$title}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <?php include APP_PATH.'../template/public/css_meta.php';?>
</head>
<body class="hold-transition skin-blue-light sidebar-mini">
<div class="wrapper">

    <?php include  APP_PATH.'../template/public/header.php'?>
    <aside class="main-sidebar">
        <section class="sidebar">
            <?php include APP_PATH.'../template/public/navigation.php'?>
        </section>
    </aside>
    <div class="content-wrapper">
        <section class="content-header">
            <h1>
                广告主
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 广告主</a></li>
            </ol>
        </section>
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-body">
                            <table id='table'
                                   data-url=""
                                   data-toggle="table"
                                   data-show-refresh="true"
                                   data-show-toggle="true"
                                   data-show-columns="true"
                                   data-search="true"
                                   data-ajax="ajax_request"
                                   data-advanced-search="true"
                                   data-pagination="true"
                                   data-side-pagination="server"
                                   data-page-list="[5, 10, 15, 20, 30, 50]"
                                   data-select-item-name="worker_picker"
                                   data-show-export="true"
                                   data-click-to-select="true"
                                   data-toolbar="#toolbar"
                                   data-sort-name="name"
                                   data-sort-order="desc">
                                <div class="bars pull-left">
                                    <div id="toolbar">
                                        <div class="btn-group pull-left">
                                            <div class="input-daterange input-group" id="reservation">
                                                <div class="input-daterange input-group" id="reservation">
                                                    <input type="text" class="input-sm form-control" name="begin_time" id="begin_time"/>
                                                    <span class="input-group-addon">到</span>
                                                    <input type="text" class="input-sm form-control" name="end_time" id="end_time"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <thead>
                                <tr>
                                    <th data-field="age"  data-align="left" data-sortable="true" >年龄</th>
                                    <th data-field="telephone"   data-align="left">联系电话</th>
                                    <th data-field="time"   data-align="left">更新时间</th>
                                    <th data-field="operate">操作</th>
                                </tr>

                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div>
        </section>
    </div>
    <?php include APP_PATH.'../template/public/footer.php' ?>
</div>
<?php include APP_PATH.'../template/public/js_footer.php'?>

</body>
<script>
    function ajax_request(params) {
        params.data.begin_time = $('#begin_time').val();
        params.data.end_time = $('#end_time').val();
        var parameter_str = jQuery.param( params.data );
        $.get("{:url('')}?"+parameter_str, function(data){
            // alert(data);
            eval("data="+data);
            // alert(data);
            params.success(data);
        });
    }
$(function(){
$('#reservation').datepicker({
        language: 'zh-CN',//显示中文
        format: 'yyyy-mm-dd',//显示格式
        // minView: "month",//设置只显示到月份
        // initialDate: new Date(),//初始化当前日期
        // autoclose: true,//选中自动关闭
        // todayBtn: true//显示今日按钮
        });
        });
</script>
</html>